<div class="gastos index">
	<h2><?php echo __('Gastos'); ?></h2>
	<table cellpadding="0" cellspacing="0">
	<thead>
	<tr>
			<th><?php echo $this->Paginator->sort('id'); ?></th>
			<th><?php echo $this->Paginator->sort('meta_id'); ?></th>
			<th><?php echo $this->Paginator->sort('fuente_id'); ?></th>
			<th><?php echo $this->Paginator->sort('estado'); ?></th>
			<th><?php echo $this->Paginator->sort('plan_contable_id'); ?></th>
			<th><?php echo $this->Paginator->sort('clasificador_id'); ?></th>
			<th><?php echo $this->Paginator->sort('fecha_documento'); ?></th>
			<th><?php echo $this->Paginator->sort('importe'); ?></th>
			<th><?php echo $this->Paginator->sort('debehaber'); ?></th>
			<th><?php echo $this->Paginator->sort('ingreso'); ?></th>
			<th><?php echo $this->Paginator->sort('glosa'); ?></th>
			<th><?php echo $this->Paginator->sort('fecha_contable'); ?></th>
			<th><?php echo $this->Paginator->sort('created'); ?></th>
			<th><?php echo $this->Paginator->sort('modified'); ?></th>
			<th><?php echo $this->Paginator->sort('documento_tipo_id'); ?></th>
			<th><?php echo $this->Paginator->sort('serie'); ?></th>
			<th><?php echo $this->Paginator->sort('numero'); ?></th>
			<th><?php echo $this->Paginator->sort('orden_compra'); ?></th>
			<th><?php echo $this->Paginator->sort('ruc_dni'); ?></th>
			<th><?php echo $this->Paginator->sort('razon_social'); ?></th>
			<th><?php echo $this->Paginator->sort('direccion'); ?></th>
			<th><?php echo $this->Paginator->sort('impuesto'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	</thead>
	<tbody>
	<?php foreach ($gastos as $gasto): ?>
	<tr>
		<td><?php echo h($gasto['Gasto']['id']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($gasto['Meta']['title'], array('controller' => 'metas', 'action' => 'view', $gasto['Meta']['id'])); ?>
		</td>
		<td>
			<?php echo $this->Html->link($gasto['Fuente']['name'], array('controller' => 'fuentes', 'action' => 'view', $gasto['Fuente']['id'])); ?>
		</td>
		<td><?php echo h($gasto['Gasto']['estado']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($gasto['PlanContable']['name'], array('controller' => 'plan_contables', 'action' => 'view', $gasto['PlanContable']['id'])); ?>
		</td>
		<td>
			<?php echo $this->Html->link($gasto['Clasificador']['name'], array('controller' => 'clasificadors', 'action' => 'view', $gasto['Clasificador']['id'])); ?>
		</td>
		<td><?php echo h($gasto['Gasto']['fecha_documento']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['importe']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['debehaber']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['ingreso']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['glosa']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['fecha_contable']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['created']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['modified']); ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($gasto['DocumentoTipo']['name'], array('controller' => 'documento_tipos', 'action' => 'view', $gasto['DocumentoTipo']['id'])); ?>
		</td>
		<td><?php echo h($gasto['Gasto']['serie']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['numero']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['orden_compra']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['ruc_dni']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['razon_social']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['direccion']); ?>&nbsp;</td>
		<td><?php echo h($gasto['Gasto']['impuesto']); ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View'), array('action' => 'view', $gasto['Gasto']['id'])); ?>
			<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $gasto['Gasto']['id'])); ?>
			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $gasto['Gasto']['id']), array(), __('Are you sure you want to delete # %s?', $gasto['Gasto']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</tbody>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Gasto'), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Metas'), array('controller' => 'metas', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Meta'), array('controller' => 'metas', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Fuentes'), array('controller' => 'fuentes', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Fuente'), array('controller' => 'fuentes', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Plan Contables'), array('controller' => 'plan_contables', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Plan Contable'), array('controller' => 'plan_contables', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Clasificadors'), array('controller' => 'clasificadors', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Clasificador'), array('controller' => 'clasificadors', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Documento Tipos'), array('controller' => 'documento_tipos', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Documento Tipo'), array('controller' => 'documento_tipos', 'action' => 'add')); ?> </li>
	</ul>
</div>
